package com.richpay.basejava.base13;

/**
 * 匿名内部类
 */
public class AnonymousInnerClass {
    public static void main(String[] args) {
        Zoo zoo = new Zoo();
        Dog dog = new Dog();
        zoo.look(dog);

        zoo.look(new Animal() {
            @Override
            public void eat() {
                System.out.println("未知动物吃");
            }
        });
    }
}
